package _2布局;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;

// 计算器
public class BorderLayoutFrame extends JFrame
{
	
	
	public BorderLayoutFrame()
	{

		
		JButton btn1 = new JButton("上北");
		JButton btn2 = new JButton("下南");
		JButton btn3 = new JButton("左西");
		JButton btn4 = new JButton("右东");
		JButton btn5 = new JButton("中间");
		this.add(btn1, BorderLayout.NORTH);
		this.add(btn2, BorderLayout.SOUTH);
		this.add(btn3, BorderLayout.WEST);
		this.add(btn4, BorderLayout.EAST);
		this.add(btn5, BorderLayout.CENTER);
		
		
		
	}

}
